using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SPDV
{
    public partial class SPRoleAssignmentForm : Form
    {
        public SPRoleAssignmentData RoleAssignmentsData
        {
            set
            {
                SPRoleAssignmentData ra = (SPRoleAssignmentData)value;
                if (null != ra)
                {
                    lblTitle.Text = ra.Title + " " + ra.ID + (null != ra.ItemID?" itemId=" + ra.ItemID.ToString():"");
                    dgvUsers.DataSource = ra.users;
                    dgvGroups.DataSource = ra.groups;
                }
            }
        }
        public SPRoleAssignmentForm()
        {
            InitializeComponent();
        }

        private void SPRoleAssignmentForm_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape) Close();
        }
    }
}